AMD IOMMU: Fix an interrupt remapping issue
authorWei Wang <wei.wang2@amd.com>
Tue, 12 Apr 2011 12:26:19 +0000 (13:26 +0100)
committerWei Wang <wei.wang2@amd.com>
Tue, 12 Apr 2011 12:26:19 +0000 (13:26 +0100)
commit9b130249ea2f81097066d686aab0bcba3df90dd7
treed3a693ee1ab6cb71cf8f4f92cdc7e0bf2d65b8b2
parent9dc2af3fd6d30f349d4410d33046feb35174d30c
AMD IOMMU: Fix an interrupt remapping issue

Some device could generate bogus interrupts if an IO-APIC RTE and an
iommu interrupt remapping entry are not consistent during 2 adjacent
64bits IO-APIC RTE updates. For example, if the 2nd operation updates
destination bits in RTE for SATA device and unmask it, in some case,
SATA device will assert ioapic pin to generate interrupt immediately
using new destination but iommu could still translate it into the old
destination, then dom0 would be confused. To fix that, we sync up
interrupt remapping entry with IO-APIC IRE on every 32 bits operation
and forward IOAPIC RTE updates after interrupt.

Signed-off-by: Wei Wang <wei.wang2@amd.com>
Acked-by: Jan Beulich <jbeulich@novell.com>
xen/drivers/passthrough/amd/iommu_intr.c